package com.hyperfix.washer.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hyperfix.models.washer.pojos.Team;
import com.hyperfix.models.washer.vos.TeamVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * @author JiangChunYu
 * 2024/4/21
 */
@Mapper
public interface TeamMapper extends BaseMapper<Team> {
    @Select("select * from team order by id")
    IPage<Team> listTeam(IPage<Team> teamIPage);

    @Update("update team set name = #{name}, leader = #{leader}, contact_number = #{contactNumber}, description = #{description} where id = #{id}")
    boolean updateTeam(TeamVO teamVO);
}
